package com.trmp.sys.orgMng.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "T_SYS_DEDICATEDROUTE")
public class DedicatedRoute implements Serializable
{
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@SequenceGenerator(name = "SEQ_UNIVERSAL", sequenceName = "S_SYSTEM_DedicatedRoute", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_UNIVERSAL")
	@Column(name = "dedicatedId", nullable = false)
	private Long dedicatedId;
	
	@Column(name = "dedicatedName", length = 50)
	private String dedicatedName;
	
	@Column(name = "inland", length = 1)
	private char inland;
	
	@ManyToMany(cascade = {CascadeType.REFRESH}, 
			fetch = FetchType.LAZY, mappedBy = "dedicatedRoutesList")
	private List<OrganInfo> organInfoList;
	
	@Transient
	private String nameArrays;
	
	public List<OrganInfo> getOrganInfoList()
	{
		return organInfoList;
	}
	
	public void setOrganInfoList(List<OrganInfo> organInfoList)
	{
		this.organInfoList = organInfoList;
	}
	
	public Long getDedicatedId()
	{
		return dedicatedId;
	}
	
	public void setDedicatedId(Long dedicatedId)
	{
		this.dedicatedId = dedicatedId;
	}
	
	public String getDedicatedName()
	{
		return dedicatedName;
	}
	
	public void setDedicatedName(String dedicatedName)
	{
		this.dedicatedName = dedicatedName;
	}
	
	public char getInland()
	{
		return inland;
	}
	
	public void setInland(char inland)
	{
		this.inland = inland;
	}

	public String getNameArrays() {
		return nameArrays;
	}

	public void setNameArrays(String nameArrays) {
		this.nameArrays = nameArrays;
	}
	
}
